#include <stdio.h>

typedef struct {
    char name[100];
    int age;
    int id;
    double score;
} Student;

Student getTopStudent(Student *students, int n) {
    int j = 0;
    double ms = 0;
    for (int i = 0; i < n; i++) {
        if (students[i].score > ms) {
            ms = students[i].score;
            j = i;
        }
    }
    return students[j];
}

void printStudentInfo(Student stu) { printf("成绩最高的学生信息： 姓名: %s\n年龄: %d\n学号: %d\n成绩: %.1lf", stu.name, stu.age, stu.id, stu.score) }